import Vue from 'vue'
import './plugins/axios'
import App from './App.vue'
import router from './router'
import store from './store'

Vue.config.productionTip = false;

//引入ant
import 'ant-design-vue/dist/antd.css';
import Ant from 'ant-design-vue';
Vue.use(Ant);

//引入主css
import './assets/css/index.css';
import './assets/css/main.css';

//引入代码高亮
import 'highlight.js/styles/darcula.css'; //引入代码高亮的css
import highlight from 'highlight.js';
//自定义highlightCode方法，将只执行一次的逻辑去掉
highlight.highlightCode = function () {
  let blocks = document.querySelectorAll('pre code');
  [].forEach.call(blocks, highlight.highlightBlock);
};

//引入mavon-editor
import mavonEditor from 'mavon-editor';
import 'mavon-editor/dist/css/index.css';
Vue.use(mavonEditor);

//引入日期处理
import moment from "moment";
Vue.prototype.$moment = moment;

new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app');
